home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW Related / MPW Script Tips 1.1.1 / Sample Scripts / ShowNPChar < prev    next >
Encoding:
Text File  |  1992-01-03  |  851 b   |  22 lines  |  [TEXT/MPS ]

  1. #-------------------------------------------------------------------------------
  2. #    ShowNPChar
  3. #    MPW Shell Script
  4. #    Written by Godfrey DiGiorgi, 3/30/89
  5. #    rev: 3/19/91 :: for 'l/L' new attribute…
  6. #    rev: 1/3/92 :: to work with any setting of Auto indent and Lock-auto-scrolling
  7. #    Copyright:    © 1991 by Apple Computer, Inc., all rights reserved.
  8. #    
  9. #    Function:    To be added to menu to toggle display of non-printing characters of active file.
  10. #-------------------------------------------------------------------------------
  11.  
  12. # use @1 to extract invisibles setting from Format -x a output
  13.     Set form `Format -x a "{Active}"`
  14.     (Evaluate "{form}" =~ /≈([iI])®1≈/) ∑∑ Dev:Null
  15. #    If invisibles are hidden, show them.
  16.     if "{®1}" == "i"
  17.         Format -a I "{Active}"
  18. #    If invisibles are shown, hide them.    
  19.     else
  20.         Format -a i "{Active}"
  21.     end
  22.